import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import FastClick from 'fastclick'
import VueLazyload from 'vue-lazyload'

import toast from '@/components/common/toast'

Vue.config.productionTip = false

Vue.prototype.$bus = new Vue() 
// 安装toast插件
Vue.use(toast)
// 懒加载
Vue.use(VueLazyload, {
  loading: require('./assets/img/common/loading.jpg')
})

// 解决移动端300ms延迟问题
FastClick.attach(document.body)

router.beforeEach((to, from, next) => {
  document.title = to.meta
  next()
}) 

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
